package cn.wusifx.zabbix.request.builder.screen;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/screenitem/updatebyposition
 */
public class ScreenItemUpdateByPositionRequestBuilder extends UpdateRequestBuilder {
    private String screenId;
    private Integer x;
    private Integer y;
    public ScreenItemUpdateByPositionRequestBuilder(String auth) {
        super("screenitem.updatebyposition", auth);
    }

    public ScreenItemUpdateByPositionRequestBuilder(Long id, String auth) {
        super("screenitem.updatebyposition", id, auth);
    }

    public String getScreenId() {
        return screenId;
    }

    public ScreenItemUpdateByPositionRequestBuilder setScreenId(String screenId) {
        this.screenId = screenId;
        return this;
    }

    public Integer getX() {
        return x;
    }

    public ScreenItemUpdateByPositionRequestBuilder setX(Integer x) {
        this.x = x;
        return this;
    }

    public Integer getY() {
        return y;
    }

    public ScreenItemUpdateByPositionRequestBuilder setY(Integer y) {
        this.y = y;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("screenid",screenId);
        baseRequest.getParams().put("x",x);
        baseRequest.getParams().put("y",y);
        return baseRequest;
    }
}
